package com.thinkfit.jy.adapter;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.thinkfit.jy.R;
import com.thinkfit.jy.bean.MainDataBean;
import com.thinkfit.jy.view.LoopViewAdapter;


public class BMWMainAdapter extends LoopViewAdapter<MainDataBean> {
    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_bmw_main, null);
        TextView tvTab = view.findViewById(R.id.tvTab);
        ImageView ivTab = view.findViewById(R.id.ivTab);
        ivTab.setImageResource(getDatas().get(position).getImg_t());
        tvTab.setText(getDatas().get(position).getTitle());
        return view;
    }
}